const express = require('express');
const {route} = require('./router/route');
var app = express();
var cors = require('cors');
var bodyParser = require('body-parser');
app.use(cors({
    origin:['http://localhost:8081'],
	origin:['http://localhost:8080'],
    methods:['GET','POST','DELETE','PUT'],
    alloweHeaders:['Conten-Type', 'Authorization']
}));
var server = app.listen(8082, function () {
    var host = server.address().address;
    var port = server.address().port;
    console.log("应用实例，访问地址为 http://", host, port)
  })
  
app.use(bodyParser());
app.use('/api',route)





